package com.jintu.portal.pojo.dto;

import com.jintu.portal.pojo.entity.TPost;
import com.jintu.portal.utils.BeanUtils;

import java.io.Serializable;

/**
 * Created by junhu on 2017/9/26.
 */
public class PostDto implements Serializable {
    private Long postId;//岗位ID
    private String postName;//岗位名称
    private Integer type;//岗位类型 1管理者，2员工
    private Long departmentTypeId;//部门类型ID
    private Integer addType;//是否系统初始化 1系统初始化,2新增
    private Long value;//岗位ID
    private String text;//岗位名称

    public PostDto(){

    }
    public PostDto(TPost post) throws Exception {
        BeanUtils.copyProperties(post,this);
        this.setPostId(post.getId());
        this.setPostName(post.getName());
        this.setValue(post.getId());
        this.setText(post.getName());

    }
    public Long getPostId() {
        return postId;
    }

    public void setPostId(Long postId) {
        this.postId = postId;
    }

    public String getPostName() {
        return postName;
    }

    public void setPostName(String postName) {
        this.postName = postName;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getDepartmentTypeId() {
        return departmentTypeId;
    }

    public void setDepartmentTypeId(Long departmentTypeId) {
        this.departmentTypeId = departmentTypeId;
    }

    public Integer getAddType() {
        return addType;
    }

    public void setAddType(Integer addType) {
        this.addType = addType;
    }

    public Long getValue() {
        return value;
    }

    public void setValue(Long value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
